<?php
session_start();
include("conn.php");
$user ="";
$pass="";
if(isset($_POST['login']))
{
$user=$_POST['user'];
$pass=$_POST['pass'];
$s="select * from users where username='$user' and pass=password('$pass')";
$r=mysql_query($s,$conn);
if(mysql_num_rows($r)==1)
{
$_SESSION['log']="True";
header("Location: index.php");	
}else
{
header("Location: login.php");
}
}

?>